package com.adcc.ags.cgw.service;

import com.adcc.ags.cgw.entity.msg.CGWMsg;
import com.adcc.ags.cgw.entity.msg.DestRoute;

import java.util.List;

/**
 * 报文路由服务
 */
public abstract class MsgRouterService extends BaseActorService {

    /**
     * 匹配路由
     * @param element
     * @param route
     * @return
     */
    protected abstract boolean matchRoute(String element, String... route);

    /**
     * 匹配路由
     * @param element
     * @param route
     * @return
     */
    protected abstract boolean matchRoute(String[] element, String... route);

    /**
     * 匹配路由
     * @param element
     * @param start
     * @param route
     * @return
     */
    protected abstract boolean matchRoute(String element, int start, String route);

    /**
     * 查找下行路由
     * @param msg
     * @return
     */
    protected abstract List<DestRoute> findDownlinkRoute(CGWMsg msg);

    /**
     * 查找上行路由
     * @param msg
     * @return
     */
    protected abstract List<DestRoute> findUplinkRoute(CGWMsg msg);

    /**
     * 查找地地路由
     * @param msg
     * @return
     */
    protected abstract List<DestRoute> findGroundRoute(CGWMsg msg);
}
